package org.durandj.ystream.server.playlist;

/**
 * Listens for changes in a <code>Playlist</code>.
 * 
 * @author durandj
 * @version 1.0
 *
 */
public interface PlaylistListener
{
	// TODO: Some of these methods may be better off being removed...
	
	/**
	 * Something was added to the playlist. The parameter
	 * for this method is the new element in the playlist.
	 * 
	 * @param newItem - the new item
	 */
	public void itemAdded(String newItem);
	
	/**
	 * Something was removed from the playlist. The parameter
	 * for this method is the element that was removed.
	 * 
	 * @param removedItem - the removed item
	 */
	public void itemRemoved(String removedItem);
	
	/**
	 * Something was moved in the playlist. The parameters
	 * represent the item that was moved and the new index
	 * of the item respectively.
	 * 
	 * @param movedItem - the item that was moved
	 * @param newIndex - the new index of the item
	 */
	public void itemMoved(String movedItem, int newIndex);
	
	/**
	 * The playlist was cleared.
	 */
	public void listCleared();
}
